//
//  JoinSureView.m
//  LoverGo
//
//  Created by liudonghuan on 14-9-11.
//  Copyright (c) 2014年 yexiao. All rights reserved.
//

#import "JoinSureView.h"

@implementation JoinSureView
@synthesize jDelegate = _jDelegate;
- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = LGCOLOR_gray;
        _titleV = [[UIView alloc]initWithFrame:CGRectMake(10, 10, 300, 40)];
        _numV = [[UIView alloc]initWithFrame:CGRectMake(10, 53, 300, 40)];
        _totalPriceV = [[UIView alloc]initWithFrame:CGRectMake(10, 96, 300, 40)];
        _timeV = [[UIView alloc]initWithFrame:CGRectMake(10, 139, 300, 40)];
        _timeV2 = [[UIView alloc]initWithFrame:CGRectMake(10, 179, 300, 40)];
        _addTimeV = [[UIView alloc]initWithFrame:CGRectMake(10, 222, 300, 40)];
        _pay = [[UIButton alloc]initWithFrame:CGRectMake(10, 280, 300, 40)];
        _deletepay= [[UIButton alloc]initWithFrame:CGRectMake(10, 330, 300, 40)];
        _titleV.backgroundColor = [UIColor whiteColor];
        _numV.backgroundColor = [UIColor whiteColor];
        _totalPriceV.backgroundColor = [UIColor whiteColor];
        _timeV.backgroundColor = [UIColor whiteColor];
        _timeV2.backgroundColor = [UIColor whiteColor];
        _addTimeV.backgroundColor = [UIColor whiteColor];
        [_pay setBackgroundColor:[UIColor colorWithRed:251/255.0 green:85/255.0 blue:116/255.0 alpha:1]];
        [_pay setTitle:@"确认支付" forState:UIControlStateNormal];
        [_pay addTarget:self action:@selector(payonclick) forControlEvents:UIControlEventTouchUpInside];
        [_deletepay setBackgroundColor:[UIColor colorWithRed:251/255.0 green:85/255.0 blue:116/255.0 alpha:1]];
        [_deletepay setTitle:@"删除订单" forState:UIControlStateNormal];
        [_deletepay addTarget:self action:@selector(deleteonclick) forControlEvents:UIControlEventTouchUpInside];
        _titleLab = [[UILabel alloc]initWithFrame:CGRectMake(5, 0, 275, 40)];
        _priceLab = [[UILabel alloc]initWithFrame:CGRectMake(275, 0, 50, 40)];
        _numName = [[UILabel alloc]initWithFrame:CGRectMake(5, 0, 275, 40)];
        _numName.text = @"数量";
        _numLab = [[UILabel alloc]initWithFrame:CGRectMake(275, 0, 50, 40)];
        _numLab.text = @"1";
        _totalPriceName = [[UILabel alloc]initWithFrame:CGRectMake(5, 0, 275, 40)];
        _totalPriceName.text = @"总价";
        _totalPriceLab = [[UILabel alloc]initWithFrame:CGRectMake(275, 0, 50, 40)];
        _timeName = [[UILabel alloc]initWithFrame:CGRectMake(5, 0, 275, 40)];
        _timeName.text = @"活动时间：";
        _timeLab = [[UILabel alloc]initWithFrame:CGRectMake(5,0 , 290, 40)];
        _addTimeName = [[UILabel alloc]initWithFrame:CGRectMake(5, 0, 140, 40)];
        _addTimeName.text = @"下单时间";
        _addTimeLab = [[UILabel alloc]initWithFrame:CGRectMake(135, 0, 180, 40)];
        [_titleV addSubview:_titleLab];
        [_titleV addSubview:_priceLab];
        [_numV addSubview:_numName];
        [_numV addSubview:_numLab];
        [_totalPriceV addSubview:_totalPriceName];
        [_totalPriceV addSubview:_totalPriceLab];
        [_timeV addSubview:_timeName];
        [_timeV2 addSubview:_timeLab];
        [_addTimeV addSubview:_addTimeName];
        [_addTimeV addSubview:_addTimeLab];
        [self addSubview:_titleV];
        [self addSubview:_numV];
        [self addSubview:_totalPriceV];
        [self addSubview:_timeV];
        [self addSubview:_timeV2];
        [self addSubview:_addTimeV];
        [self addSubview:_pay];
        [self addSubview:_deletepay];
        
        
        
    }
    return self;
}
-(void)deleteonclick
{
    [_jDelegate deletePay];
}
-(void)payonclick
{
    [_jDelegate surePay];
    
}

@end
